package cn.ym.mall.dao;

import cn.ym.mall.entity.Announcement;
import cn.ym.mall.entity.Order;

import java.sql.SQLException;
import java.util.List;

/**
 * 赵金明
 * 2022/8/11
 * 公告DAO接口
 */
public interface AnnouncementDao {
    /**
     * 新增公告
     * @param announcement
     * @return 成功条数
     */
    public Integer addAnnouncement(Announcement announcement)throws SQLException;

    /**
     * 根据公告id删除公告
     * @param aceid
     * @return 返回删除条数
     */
    public Integer deleteByAceid(Integer aceid)throws SQLException ;

    /**
     * 通过订单id查询公告信息
     * @param aceid
     * @return
     */
    public Announcement getAnnouncementByAceid(Integer aceid)throws SQLException ;
    /**
     * 查询公告总数
     * @return
     */
    public long getAnnouncementCount() throws SQLException;
    /**
     * 分页查询公告
     * @param pageNo
     * @param pageSize
     * @return
     * @throws SQLException
     */
    public List<Announcement> getPageAnnouncement( Integer pageNo, Integer pageSize) throws SQLException;

}
